<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="apple-itunes-app" content="app-id=869299193"/>
</head>
<body>
<!-- <script type="text/javascript" src="../static/bootstrap/js/hippo2.min.v11.js"></script> -->
<script>
var isAndroid = false;
var iPhone = false;
var iPad = false;
var userAgent = navigator.userAgent;
var downloadUrl = "http://mobile.hupu.com/download/joggers?r=share";
if (userAgent.match("Android")){
	isAndroid = true;
}else if (userAgent.match("iPhone")){
	iPhone = true;
	downloadUrl = "http://itunes.apple.com/cn/app/hu-pu-pao-bu/id869299193?mt=8";
	// downloadUrl = "itms-apps://itunes.apple.com/app/id452186370";
}
	var redirect_url = "";
	if(isAndroid || iPhone || iPad){
		var startTime = Date.now();
		var schema = '{$redirect}';
		div = document.createElement('div');
		div.style.visibility = 'hidden';
		// div.innerHTML = '<iframe id="schema" src="' + 'dianping://complexweb?url=http%3a%2f%2ft.dianping.com%2flab%2ffreeeating%2factivitydetail%3feventName%3dmfchwlzs%26cityid%3d*%26dpid%3d*%26version%3d*%26token%3d*%26latitude%3d*%26longitude%3d*&utm_=w_qzonefeeds1013&utm_=__k39' + '" scrolling="no" width="1" height="1"></iframe>';
		div.innerHTML = '<iframe id="schema" src="' + schema + '" scrolling="no" width="1" height="1"></iframe>';
		document.body.appendChild(div);

		var delta = Date.now() - startTime;
		if(delta < 200){
			startTime = Date.now();
			document.getElementById("schema").src="";
			delta = Date.now() - startTime;
			if(delta < 200){
				if(downloadUrl!==null && downloadUrl!==''){
					redirect_url = downloadUrl;
				}else{
				}
			}
		}
	}else{
			redirect_url = downloadUrl;
	}
	if(redirect_url){
		setTimeout(function(){
			window.location = redirect_url;
		}, 500);
	}
</script>
</body></html>